package org.example.chain.service.impl;

import org.example.chain.service.Validation;

public class NumberValidation implements Validation {
    @Override
    public void valid(String param) throws IllegalArgumentException {
        if (!param.matches("^\\+?[1-9][0-9]*$")) {
            throw new IllegalArgumentException("含有非数字消息!");
        }
    }
}
